package com.example.manu_facturer_orders.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.manu_facturer_orders.pojo.ServiceProviderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author: tobed
 * @date: 2022/9/13
 * @time: 16:57
 */
@Mapper
public interface ServiceProviderMapper {


    /**
     * 服务商全查
     * @param facilitatorCode
     * @param facilitatorName
     * @param signingType
     * @param page
     * @return
     */
    Page<ServiceProviderVO> list(
            @Param("facilitatorCode") String facilitatorCode,
            @Param("facilitatorName") String facilitatorName,
            @Param("signingType") Integer signingType,
            Page<ServiceProviderVO> page);

    /**
     * 服务商解约
     * @param id
     * @return
     */
    int terminationService(@Param("id") Integer id);

    /**
     * 启用或停用服务商
     * @param id
     * @param type
     * @return
     */
    int openOrClose(@Param("id") Integer id,@Param("type") int type);

}
